
package com.community.itelligentcommunity.community.myCommunity.controller;

import com.community.itelligentcommunity.common.base.controller.GenericController;
import com.community.itelligentcommunity.common.base.service.GenericService;
import com.community.itelligentcommunity.community.myCommunity.entity.MarktGood;
import com.community.itelligentcommunity.community.myCommunity.entity.Praise;
import com.community.itelligentcommunity.community.myCommunity.entity.QueryMarktGood;
import com.community.itelligentcommunity.community.myCommunity.entity.QueryPraise;
import com.community.itelligentcommunity.community.myCommunity.service.MarktGoodService;
import com.community.itelligentcommunity.community.myCommunity.service.PraiseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/marktGood")
public class MarktGoodController extends GenericController<MarktGood, QueryMarktGood> {

    @Autowired
    private MarktGoodService marktGoodService;


    @Override
    protected GenericService<MarktGood, QueryMarktGood> getService() {
        return marktGoodService;
    }

    @Override
    public String addPage() throws Exception {
        return "ccommunity/myCommunity/MarktGood";
    }

    @Override
    public String updatePage(MarktGood entity, Model model) throws Exception {
        entity = getService().get(entity);
        model.addAttribute("entity", entity);
        return "community/myCommunity/Praise/update";
        }


        }

